home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindlink.net!uniserve!dudd!carl
- From: Carl@dudd.uniserve.com (Carl)
- Date: 05 Mar 96 20:25:08
- Newsgroups: comp.lang.c++
- Subject: Template declaration in h file and cpp file
- Message-ID: <6cc_9603060955@dudd.uniserve.com>
- X-FTN-To: mikael@academey.bastad.se
- Organization: De Udda Edda [604] 852-4568 V34+ 33.6
-
- -=> Quoting mikael@academey.bastad.se to All <=-
-
-
- mi> The problem is that the linker returns the following error:
- mi> Undefinded symbol QSort(int,int,int far *); in module test.cpp
- just add the line
- QSort(int,int,int far *);
- before the main() (or after it if you really want to... but that's outdated)
- and be sure to included the semicolon on the end... otherwise it will think
- you are redefining the function when in fact you are merely declaring it.
- mi> This problem doesent occur if the main function is in SORT.CPP below
- mi> the QSort function.
- Ya.. but try moving QSort underneath main() and you'll see the same result
- All you need is a prototype declared at the top just like I showed ya
-